import request from '@/config/axios'

// 师昌绪-最终获奖记录 VO
export interface ScxFinalWinningRecordVO {
  id: string // 最终获奖记录ID
  awardId: string // 评奖ID
  rank: string // 获得等级
  candidateId: string // 候选人ID
  accountId: number // 候选人账号ID
  finalScore: number // 终评票数
  score: number // 初评得分
  confirmed: boolean // 管理员是否确认结果
  remark: string // 备注
}

// 师昌绪-最终获奖记录 API
export const ScxFinalWinningRecordApi = {
  // 查询师昌绪-最终获奖记录分页
  getScxFinalWinningRecordPage: async (params: any) => {
    return await request.get({ url: `/awards/scx-final-winning-record/page`, params })
  },

  // 查询师昌绪-最终获奖记录详情
  getScxFinalWinningRecord: async (id: number) => {
    return await request.get({ url: `/awards/scx-final-winning-record/get?id=` + id })
  },

  // 新增师昌绪-最终获奖记录
  createScxFinalWinningRecord: async (data: ScxFinalWinningRecordVO) => {
    return await request.post({ url: `/awards/scx-final-winning-record/create`, data })
  },

  // 修改师昌绪-最终获奖记录
  updateScxFinalWinningRecord: async (data: ScxFinalWinningRecordVO) => {
    return await request.put({ url: `/awards/scx-final-winning-record/update`, data })
  },

  // 删除师昌绪-最终获奖记录
  deleteScxFinalWinningRecord: async (id: number) => {
    return await request.delete({ url: `/awards/scx-final-winning-record/delete?id=` + id })
  },

  // 导出师昌绪-最终获奖记录 Excel
  exportScxFinalWinningRecord: async (params) => {
    return await request.download({ url: `/awards/scx-final-winning-record/export-excel`, params })
  }
}
